﻿<Window x:Class="PRPROIZV.CreateOrder"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:PRPROIZV"
        mc:Ignorable="d"
        Title="Order" Height="600" Width="800" WindowStartupLocation="CenterScreen" WindowStyle="None" Activated="Window_Activated" MouseMove="Window_MouseMove" KeyDown="Window_KeyDown">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="0"></RowDefinition>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Border Background="#FF349C3D" Grid.ColumnSpan="5" CornerRadius="0,0,0,0" ></Border>
        <Image Source="Resource/logo.png" HorizontalAlignment="Left"/>
        <TextBlock x:Name="Who" Grid.Column="1" TextAlignment="Center" VerticalAlignment="Center" FontSize="28" Text="Оформление заказа"></TextBlock>
        <Button Name="RoolUp" Background="WhiteSmoke" VerticalAlignment="Top" ToolTip="Свернуть" Grid.Column="2" HorizontalAlignment="Right" Margin="0,0,40,0" Width="20" Click="RoolUp_Click"  Content="__"></Button>
        <Button x:Name="Close"  Background="WhiteSmoke" VerticalAlignment="Top" ToolTip="Закрыть" Grid.Column="2" HorizontalAlignment="Right" Click="Close_Click" Width="20" Content="✕"></Button>
        <Button x:Name="FullSize" Background="White" VerticalAlignment="Top" ToolTip="На весь экран" Grid.Column="2" HorizontalAlignment="Right" Click="FullSize_Click" Width="20" Margin="0,0,20,0" Content="▢"/>
        <TextBlock x:Name="TimeClose" Text="" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="50,0,0,0"/>
        <TabControl Grid.Row="2" Grid.Column="1" Grid.RowSpan="2">
            <TabItem Header="Услуги" Background="#FF92D050" Width="125" FontSize="18">
                <TabControl>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="5"/>
                            <ColumnDefinition Width="3*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="Поиск услуг" FontSize="18" TextAlignment="Center" VerticalAlignment="Top"/>
                        <TextBox x:Name="SearchService" TextChanged="SearchService_TextChanged" VerticalAlignment="Top" TextAlignment="Center" Margin="0,30,0,0" FontSize="18" Height="40"/>
                        <TextBlock Text="Название услуги" FontSize="18" TextAlignment="Center" VerticalAlignment="Center"/>
                        <TextBox x:Name="NameingService" FontSize="18" Height="40" VerticalAlignment="Center" TextAlignment="Center" Margin="0,70,0,0"/>
                        <TextBlock Text="Стоимость услуги" FontSize="18" TextAlignment="Center" Margin="0,150,0,0" VerticalAlignment="Center"/>
                        <TextBox x:Name="CostService" PreviewTextInput="CostService_PreviewTextInput" FontSize="18" Height="40" VerticalAlignment="Center" TextAlignment="Center" Margin="0,220,0,0"/>
                        <Button x:Name="AddService" Click="AddService_Click" Height="40" Background="#FF92D050" Margin="0,80,0,0" BorderBrush="Black" BorderThickness="2" Content="Добавление услуги" VerticalAlignment="Bottom" FontSize="18">
                            <Button.Resources>
                                <Style TargetType="Border">
                                    <Setter Property="CornerRadius" Value="5"/>
                                </Style>
                            </Button.Resources>
                        </Button>
                        <ListView x:Name="ServicesList" Grid.Column="2" Foreground="Black">
                            <ListView.View>
                                <GridView>
                                    <GridViewColumn Header="Номер услуги" Width="auto" DisplayMemberBinding="{Binding ID_Service}"></GridViewColumn>
                                    <GridViewColumn Header="Наименование" Width="auto" DisplayMemberBinding="{Binding Name}"></GridViewColumn>
                                    <GridViewColumn Header="Код услуги" Width="auto" DisplayMemberBinding="{Binding ServiceCode}"></GridViewColumn>
                                    <GridViewColumn Header="Стоимость" Width="auto" DisplayMemberBinding="{Binding Cost, StringFormat=F0}"></GridViewColumn>
                                </GridView>
                            </ListView.View>
                        </ListView>
                    </Grid>
                </TabControl>
            </TabItem>
            <TabItem Header="Клиенты" Background="#FF92D050" Width="125" FontSize="18">
                <TabControl>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="5"/>
                            <ColumnDefinition Width="3*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="Поиск клиента" FontSize="18" TextAlignment="Center" VerticalAlignment="Top"/>
                        <TextBox x:Name="SearchClient" TextChanged="SearchClient_TextChanged" VerticalAlignment="Top" TextAlignment="Center" Margin="0,30,0,0" FontSize="18" Height="40"/>
                        <Button x:Name="AddClient" Click="AddClient_Click" Height="40" Background="#FF92D050" BorderBrush="Black" BorderThickness="2" Margin="0,80,0,0" Content="Добавление клиента" VerticalAlignment="Bottom" FontSize="18">
                            <Button.Resources>
                                <Style TargetType="Border">
                                    <Setter Property="CornerRadius" Value="5"/>
                                </Style>
                            </Button.Resources>
                        </Button>
                        <ListView x:Name="ClientList" Grid.Column="2" Foreground="Black">
                            <ListView.View>
                                <GridView>
                                    <GridViewColumn Header="Номер клиента" Width="auto" DisplayMemberBinding="{Binding ID_Client}"></GridViewColumn>
                                    <GridViewColumn Header="Фамилия" Width="auto" DisplayMemberBinding="{Binding Client}"></GridViewColumn>
                                    <GridViewColumn Header="Серия" Width="auto" DisplayMemberBinding="{Binding Series}"></GridViewColumn>
                                    <GridViewColumn Header="Номер" Width="auto" DisplayMemberBinding="{Binding Number}"></GridViewColumn>
                                    <GridViewColumn Header="Дата рождения" Width="auto" DisplayMemberBinding="{Binding DataOfBirthday}"></GridViewColumn>
                                    <GridViewColumn Header="Индекс" Width="auto" DisplayMemberBinding="{Binding Index}"></GridViewColumn>
                                    <GridViewColumn Header="Город" Width="auto" DisplayMemberBinding="{Binding Title}"></GridViewColumn>
                                    <GridViewColumn Header="Улица" Width="auto" DisplayMemberBinding="{Binding Street}"></GridViewColumn>
                                    <GridViewColumn Header="Дом" Width="auto" DisplayMemberBinding="{Binding Home}"></GridViewColumn>
                                    <GridViewColumn Header="Квартира" Width="auto" DisplayMemberBinding="{Binding Flat}"></GridViewColumn>
                                    <GridViewColumn Header="Почта" Width="auto" DisplayMemberBinding="{Binding Email}"></GridViewColumn>
                                    <GridViewColumn Header="Пароль" Width="auto" DisplayMemberBinding="{Binding Password}"></GridViewColumn>
                                </GridView>
                            </ListView.View>
                        </ListView>
                    </Grid>
                </TabControl>
            </TabItem>
            <TabItem Header="Заказы" Background="#FF92D050" Width="125" FontSize="18">
                <TabControl>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="2*"/>
                            <ColumnDefinition Width="5"/>
                            <ColumnDefinition Width="2*"/>
                        </Grid.ColumnDefinitions>
                        <Grid Grid.Column="2">
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <ListView x:Name="CLOrder" Foreground="Black" Grid.Column="2" MouseDoubleClick="CLOrder_MouseDoubleClick">
                                <ListView.View>
                                    <GridView>
                                        <GridViewColumn Header="Номер клиента" Width="auto" DisplayMemberBinding="{Binding ID_Client}"></GridViewColumn>
                                        <GridViewColumn Header="ФИО клиента" Width="auto" DisplayMemberBinding="{Binding Client}"></GridViewColumn>
                                    </GridView>
                                </ListView.View>
                            </ListView>
                            <ListView x:Name="ServiceOrder" Foreground="Black" Grid.Column="2" Grid.Row="1" MouseDoubleClick="ServiceOrder_MouseDoubleClick">
                                <ListView.View>
                                    <GridView>
                                        <GridViewColumn Header="Название услуги" Width="auto" DisplayMemberBinding="{Binding Name}"/>
                                        <GridViewColumn Header="Код услуги" Width="auto" DisplayMemberBinding="{Binding ServiceCode}"/>
                                        <GridViewColumn Header="Стоимость" Width="auto" DisplayMemberBinding="{Binding Cost, StringFormat=F0}"/>
                                    </GridView>
                                </ListView.View>
                            </ListView>
                        </Grid>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="40"/>
                                <RowDefinition Height="40"/>
                                <RowDefinition/>
                                <RowDefinition Height="40"/>
                            </Grid.RowDefinitions>
                            <Button x:Name="AddOrder" Click="AddOrder_Click" Background="#FF92D050" Grid.Row="3" BorderBrush="Black" BorderThickness="2" Content="Оформление заказа" FontSize="18">
                                <Button.Resources>
                                    <Style TargetType="Border">
                                        <Setter Property="CornerRadius" Value="5"/>
                                    </Style>
                                </Button.Resources>
                            </Button>
                            <TextBlock x:Name="FIOCL" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="24"/>
                            <ComboBox x:Name="TimeRental" Grid.Row="1" Width="80" Height="40" HorizontalAlignment="Left"/>
                            <StackPanel x:Name="TakeService" Grid.Row="2"/>
                            <Button x:Name="PlusService" Grid.Row="1" Click="PlusService_Click" Background="Transparent" BorderThickness="0" HorizontalAlignment="Right">
                                <Image Source="Resource/Add.png"/>
                            </Button>
                        </Grid>
                    </Grid>
                </TabControl>
            </TabItem>
        </TabControl>
    </Grid>
</Window>